#include "StdAfx.h"
#include "CCommandAlias.h"
#include "CConsoleSystem.h"
#include "IConsoleScreen.h"


CCommandAlias::CCommandAlias( const csString & strAliasName, CCommand * pCommand ) 
: CCommand( strAliasName, "alias for \'" + pCommand->GetCommandName() + "\' command." )
, m_pCommand(pCommand)
{
}

bool CCommandAlias::Execute( IConsoleScreen *pScreen, const CArgumentList & args )
{
	if ( m_pCommand )
		return m_pCommand->Execute( m_pCommand, pScreen, args );
		//return CCommand::Execute( m_pCommand, pScreen, args );

	pScreen->PrintWarning( "cannot find command." );
	return false;
}




